-- GENERATED SPELL FOR [Shandaral Hunter Spirit] --


function spell0_30864(pUnit, Event) --@Aimed Shot,n/a--
pUnit:FullCastSpellOnTarget(54615,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30864', 9000, 1)
end

function spell1_30864(pUnit, Event) --@Improved Wing Clip,n/a--
pUnit:FullCastSpellOnTarget(47168,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30864', 6303, 1)
end

function spell2_30864(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30864', 547, 1)
end

function Sorts_30864(pUnit, Event)
local choix_sorts_30864 = math.random(0, 2)
if choix_sorts_30864 == 0 then
pUnit:RegisterEvent('spell0_30864', 1, 1)
end
if choix_sorts_30864 == 1 then
pUnit:RegisterEvent('spell1_30864', 1, 1)
end
if choix_sorts_30864 == 2 then
pUnit:RegisterEvent('spell2_30864', 1, 1)
end
end

function mob30864_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30864', math.random(1500, 3000), 1)
end

function mob30864_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30864_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30864_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30864, 1, 'mob30864_Action')
RegisterUnitEvent(30864, 2, 'mob30864_Leave')
RegisterUnitEvent(30864, 3, 'mob30864_Kill')
RegisterUnitEvent(30864, 4, 'mob30864_Die')
